<template>
    <div class="root">
        <span class="fa fa-align-justify menu-btn" @click="menuClick"></span>
        <span class="title"><slot></slot></span>
        <span class="fa fa-user-o user-btn"></span>
    </div>
</template>

<script>

import bus from "../util/bus.js"
    export default {
        methods:{
            menuClick:function(){
                bus.$emit("openMenu")
            }
        }
    }
</script>

<style scoped>
    .root{
        height: 50px;
        background-color: #282828;
        display: flex;
    }
    .root span{
        line-height: 50px;
        font-size: 22px;
        display: inline-block;
    }
    .menu-btn{
        color: #999999;
        width: 80px;
        padding-left: 20px;
    }
    .title{
        color: white;
        width: 60%;
    }
    .user-btn{
        padding-right: 20px;
        text-align: right;
        color: #999999;
        width: calc(100% - 80px - 60%);
    }
</style>